<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
    <title>Liste de vos contacts</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" media="screen" type="text/css" title="Design" href="<c:url value="/resources/design.css"/>" />
	<link rel="shortcut icon" href="<c:url value="/resources/Powerpoint.ico"/>" />
</head>

<body>
    <div class="subbody">
    
    <h1>Liste de vos contacts</h1>
    
        <form action="delete" method="post">
			<table>
				<c:forEach var="contactIterator" items="${contacts}" varStatus ="i">
					<tr>
						<td><input type="checkbox" name="check${i.count}" /></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.firstName}</a></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.secondName}</a></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.phoneNumber}</a></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.email}</a></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.birthDate}</a></td>
						<td><a href="contact?id=${contactIterator.id}">${contactIterator.active}</a></td>
					</tr>
				</c:forEach>
			</table>
            <div class="obutton">
            <input type="button" value="Ajouter" onclick="self.location='editContact?id=-1'"/>
            <input type="submit" value="Supprimer"/>
            </div>
        </form>
    </div>
</body>
</html>